package com.juanable.niubility.designPatterns;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Auther: lyg
 * @Data: 2022/8/8
 */
@Getter
@AllArgsConstructor
public enum StrategyEnum {

    TESLA("tesla"),
    TOYOTA("toyota"),
    HONDA("honda");

    String desc;

    public static StrategyEnum getDesc(String desc) {
        for (StrategyEnum value : values()) {
            if (value.getDesc().equals(desc)) {
                return value;
            }
        }
        return null;
    }
}
